Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kernelCTF CVE-2024-26642_mitigation #131

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

conlonial
Copy link
Contributor

No description provided.

@koczkatamas koczkatamas force-pushed the master branch 2 times, most recently from b2e2b9f to 43a5a81 Compare September 27, 2024 21:30
@koczkatamas koczkatamas force-pushed the master branch 3 times, most recently from 933028d to c111d81 Compare March 3, 2025 14:31
@koczkatamas koczkatamas force-pushed the master branch 13 times, most recently from 76d6b57 to bf0d68f Compare March 13, 2025 15:39
Copy link
Collaborator

@koczkatamas koczkatamas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey,

This is just a quick code quality review. We're planning to review the submissions more deeply (actually understanding what the exploit does) in two weeks.

Please read our new (although still draft) style guide and refactor your exploit to follow the recommendations there.

I've also left some explicit comments. Please fix the similar issues found in your other PRs as well, especially in #130 in addition to the comments in this PRs and also fix the similar issues found here in the other PRs.

Thanks for the submission and PR!

// This rule than has 4 expressions which will run our payload.
struct payload {
// This is provided by struct xt_table_info->size
#if 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return sched_setaffinity(getpid(), sizeof(set), &set);
}

#define MY_TABLE "foo_tab", strlen("foo_tab")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

u64 add_rsp_0x88 = 0xffffffff810ebbdd;


#define FOR_ALL_OFFSETS(x) do { \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic seems to be overly complicated. We prefer this format better: https://google.github.io/security-research/kernelctf/style_guide#rop-chains

i64 diff = 0xffffffff81000000 - base;
printf("diff: %lld\n", diff);

#define x(name) { name -= diff; printf("corrected %s to %llx\n", #name, name); }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic seems to be overly complicated. We prefer this format better: https://google.github.io/security-research/kernelctf/style_guide#rop-chains

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants